package com.zp.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * create subscribe information entity with properties
 * 
 * @version 1.0
 * 
 * @since 1.0
 * 
 * @author chenlijun08@gmail.com
 * 
 * @date 2014/2/22
 * 
 */
@XmlRootElement
@Entity
@Table(catalog = "zzyyp", name = "tb_subscribe")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Subscribe implements Serializable {

	private static final long serialVersionUID = 1L;
	private String id;
	// primary key of schedule
	private String scheduleId;
	// prmary key of user
	private String userId;
	private String status;

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Column(length = 32, nullable = false, name = "subscribe_id", unique = true)
	public String getId() {
		return id;
	}

	public void setId(String userId) {
		this.id = userId;
	}

	@Column(length = 32, nullable = false, name = "subscrbe_schedule_id")
	public String getScheduleId() {
		return scheduleId;
	}

	public void setScheduleId(String scheduleId) {
		this.scheduleId = scheduleId;
	}

	@Column(length = 32, nullable = false, name = "subscribe_user_id")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(length = 1, name = "subscribe_status")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
